import { createApp } from 'vue'
import App from './App.vue'

import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import locale from 'element-plus/es/locale/lang/zh-cn';
import 'element-plus/theme-chalk/dark/css-vars.css';
import router from './router'
import register from './register'
import { createPinia } from 'pinia'
import 'amfe-flexible'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import lottieAnimation from '@/components/lottieAnimation.vue';
import chatImage from '@/components/chatImage.vue';
import { library } from '@fortawesome/fontawesome-svg-core';
import loginFrame from '@/utils/ddlogin.js'
import '@/assets/css/index.less';
import '@/assets/css/var.css';
import 'csshake/dist/csshake.min.css';
import Vant from "vant";
import "vant/lib/index.css";
// 实心图标
import {
    faCircle, faCheckSquare, faPencil,
    faStar, faPlus, faTimes, faCheck,
    faCircleMinus,
    faKey, faUser, faSpinner, faBars,
    faArrowRotateRight,
    faArrowRotateLeft,
    faPaintRoller,
    faImage,
    faEraser,
    faStrikethrough,
    faUnderline,
    faLink,
    faFillDrip,
    faItalic,
    faFont,
    faBold,
    faAlignLeft,
    faAlignRight,
    faAlignJustify,
    faAlignCenter,
    faEllipsis,
    faXmark,
    faTable,
    faFileWord,
    faPaperPlane,
    faRobot,
    faCamera,
    faVideo,
    faCircleExclamation,
    faFile
} from '@fortawesome/free-solid-svg-icons';
import { faCircleRight, faStar as farStar, faUser as farUser, faBell as farBell, faFaceSmile } from '@fortawesome/free-regular-svg-icons';

library.add(faCircle);
library.add(faCheckSquare);
library.add(faPencil);
library.add(faPlus);
library.add(faTimes);
library.add(faStar);
library.add(farStar);
library.add(farUser);
library.add(faUser);
library.add(farBell);
library.add(faCheck);
library.add(faKey);
library.add(faSpinner);
library.add(faBars);
library.add(faCircleMinus);
library.add(faArrowRotateRight);
library.add(faArrowRotateLeft);
library.add(faPaintRoller);
library.add(faImage);
library.add(faEraser);
library.add(faStrikethrough);
library.add(faUnderline);
library.add(faLink);
library.add(faFillDrip);
library.add(faFont);
library.add(faItalic);
library.add(faBold);
library.add(faAlignLeft);
library.add(faAlignRight);
library.add(faAlignJustify);
library.add(faAlignCenter);
library.add(faEllipsis);
library.add(faTable);
library.add(faXmark);
library.add(faFileWord);
library.add(faPaperPlane);
library.add(faRobot);
library.add(faFaceSmile);
library.add(faCamera);
library.add(faVideo);
library.add(faCircleExclamation);
library.add(faFile);
// console.log(import.meta.env.MODE)
const app = createApp(App)
app.use(router)
app.use(register)
app.use(Vant);
app.use(ElementPlus, { locale })
app.provide("ddLogin", loginFrame)
app.config.globalProperties.$ddLogin = loginFrame    // vue3.x写法
app.use(createPinia())
app.component('font-awesome-icon', FontAwesomeIcon);
//全局组件
app.component('lottie-animation', lottieAnimation);
app.component('chat-image', chatImage);



app.mount('#app')

